async function reqGetUserFn() {
    const res = await reqGetUserInfo();
    console.log(res);
    let {
        data: {
            email,
            id,
            username,
            nickname
        }
    } = res.data;
    console.log(email, id, username, nickname);
    $('input[name=username]').val(username);
    $('input[name=email]').val(email);
    $('input[name=nickname]').val(nickname);
    $('input[name=id]').val(id);
}
reqGetUserFn();
// 确认修改按钮
$('.layui-form').on('submit',async function (e) {
    e.preventDefault();
    const obj = {
        username: $('input[name=username]').val(),
        email: $('input[name=email]').val(),
        nickname: $('input[name=nickname]').val(),
        id: $('input[name=id]').val()
    }
        const res = await reqPostUpdateUserInfo(obj)
        console.log(res);
    window.parent.reqGetUserFn();
})
// 重置按钮
$('.my-reset').on('click', function (e) {
    e.preventDefault();
    reqGetUserFn();
})